package com.sanyang.lawyer.service.finance;

import com.sanyang.lawyer.entity.Finance_invoice;
import com.sanyang.lawyer.mapper.finance.Finance_invoiceMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * @program: lawyer
 * @description: 发票详情
 * @author: lql
 * @create: 2019-10-12 09:51
 **/
@Service
public class Finance_invoiceService {

    @Autowired
    private Finance_invoiceMapper finance_invoiceMapper;

    public List<Finance_invoice> list(Map<String,String> map){
        return finance_invoiceMapper.list(map);
    }

    //修改发票状态
    public int update(Finance_invoice finance_invoice){
        return finance_invoiceMapper.update(finance_invoice);
    }


    //根据caseid查找
    public List<Finance_invoice> getByCase(String caseId){
        return finance_invoiceMapper.getByCase(caseId);
    }
    //分类开票汇总
    public List<Map<String,Object>> invoiceCollect(Map map){
        return finance_invoiceMapper.invoiceCollect(map);
    }

    //添加
    public int add(Map<String,String> map){
        return finance_invoiceMapper.add(map);
    }

    //删除
    public int del(int invoiceId){
        return finance_invoiceMapper.del(invoiceId);
    }

    //根据id查询
    public Finance_invoice getById(int invoiceId){
        return finance_invoiceMapper.getById(invoiceId);
    }
}
